local niepan = fk.CreateSkill{
  name = "steam__jihan",
  tags = { Skill.Limited,Skill.Lord },
}

Fk:loadTranslationTable{
  ["steam__jihan"] = "殛汉",
  [":steam__jihan"] = "主公技，限定技，当你进入濒死状态时，你可以回复X点体力（X为未发动“标爵”的汉势力角色数）。",


}

niepan:addEffect(fk.AskForPeaches, {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(niepan.name) and player.dying and
      player:usedSkillTimes(niepan.name, Player.HistoryGame) == 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke(niepan.name)
    room:notifySkillInvoked(player, niepan.name, "support")
    local n=0
    for _,p in ipairs(room.alive_players) do
        if p.kingdom=="han" and p:getMark("biaojue_han")==0 then
            n=n+1
        end
    end
    room:recover{
        who = player,
        num = n,
        recoverBy = player,
        skillName = niepan.name,
    }
  end,
})

return niepan
